<template>
<onekit-page>
<onekit-view onekit-class="container">
	<div is="onekit-template-head" :DATA="`${JSON.stringify({title:'setNaivgationBarTitle'})}`"></div>
	<onekit-form onekit-class="page-body" @Submit="setNaivgationBarTitle">
		<onekit-view onekit-class="weui-cells weui-cells_after-title">
			<onekit-view onekit-class="weui-cell weui-cell_input">
				<onekit-view onekit-class="weui-cell__hd">
					<onekit-view onekit-class="weui-label">页面标题</onekit-view>
				</onekit-view>
				<onekit-view onekit-class="weui-cell__bd">
					<onekit-input onekit-class="weui-input" type="text" placeholder="请输入页面标题并点击设置即可" name="title"></onekit-input>
				</onekit-view>
			</onekit-view>
		</onekit-view>
		<onekit-view onekit-class="btn-area">
			<onekit-button type="primary" formType="submit">设置</onekit-button>
		</onekit-view>
	</onekit-form>
	<div is="onekit-template-foot"></div>
</onekit-view>
</onekit-page></template>
<script>
/* eslint-disable */
import Vue from 'vue';
import onekit_template_0 from '../../../common/head.head.vue';Vue.component('onekit-template-head',onekit_template_0);
import onekit_template_1 from '../../../common/foot.foot.vue';Vue.component('onekit-template-foot',onekit_template_1);
const ONEKIT_JSON= {
  "navigationBarTitleText": "设置页面标题",
  "usingComponents": {
    
  }
};
const ONEKIT_SJS = {
};
import wx from '../../../../weixin2vue/wx.js';
import Macro from '../../../../weixin2vue/Macro.js';
const {getApp,getCurrentPages} = Macro;
import Page from '../../../../weixin2vue/OnekitPage.js';
import Component from '../../../../weixin2vue/OnekitComponent.js';
export default Page(ONEKIT_JSON,[],ONEKIT_SJS,{
    "onShareAppMessage"(){
      return {
        "title":'设置页面标题',
        "path":'packageAPI/pages/set-navigation-bar-title/set-navigation-bar-title'
};
    },
    "setNaivgationBarTitle"(e){
      const title = e.detail.value.title;
      console.log(title);
      wx.setNavigationBarTitle({
        title,
        "success"(){
          console.log('setNavigationBarTitle success');
        },
        "fail"(err){
          console.log('setNavigationBarTitle fail, err is',err);
        }
});
      return false;
    }
});

</script>
<style 
 lang="css">
@import '/common/lib/weui.css';
.weui-label {
  width: 5em ;
}
</style>